<template>
  <div>
    <h2>我是Profile组件</h2>
    <p>姓名:{{$route.query.name}}</p>
    <p>年龄:{{$route.query.age}}</p>
    <!-- $route.query.name 获取传参的name参数 -->
  </div>
</template>

<script>
  export default {
    name: "Profile",
    created() {
      console.log("profile created");
    },
    destroyed() {
      console.log("profile destroyed");
    },
  }
</script>

<style scoped>

</style>
